<!DOCTYPE html>
<html lang="zh-cn" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.thymeleaf.org" layout:decorator="admin/fragments/layout">
<head>
    <title>系统管理-系统日志</title>
    <meta name="active" content="tenant-manage"/>
    <link rel="stylesheet" type="text/css"
          th:href="@{/resources/vendor/plugins/datatables/media/css/dataTables.bootstrap.css}"/>

    <!-- 弹出框 CSS -->
    <link rel="stylesheet" type="text/css" th:href="@{/resources/vendor/plugins/magnific/magnific-popup.css}"/>

    <!-- 弹出框 -->
    <script th:src="@{/resources/vendor/plugins/magnific/jquery.magnific-popup.js}"></script>

    <!-- 提示 PNotify -->
    <script th:src="@{/resources/vendor/plugins/pnotify/pnotify.js}"></script>

    <!--jquery 确认框-->
    <script th:src="@{/resources/jquery-confirm-master/js/jquery-confirm.js}"></script>
    <link rel="stylesheet" type="text/css" th:href="@{/resources/jquery-confirm-master/css/jquery-confirm.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/resources/jquery-confirm-master/css/jquery-confirm.less}"/>

</head>
<body>

<header id="topbar" class="ph10" layout:fragment="topbar">
    <div class="topbar-left">
        <ol class="breadcrumb">
            <li class="crumb-icon crumb-active">
                <a th:href="@{/admin/dashboard}"> <span class="glyphicon glyphicon-home"></span> </a>
            </li>
            <li class="crumb-trail">系统管理</li>
            <li class="crumb-trail">系统日志</li>

        </ol>
    </div>
    <div class="topbar-right hidden-xs hidden-sm" id="toggle_sidemenu_r">
        <a href="#" class="btn btn-default btn-sm fw400 mr10">
            <span class="fa fa-search"></span> 查询
        </a>
    </div>
</header>

<div layout:fragment="content">
    <div class="panel panel-visible" id="spy1">
        <div class="panel-heading">
            <div class="panel-title hidden-xs">
                <span class="glyphicon glyphicon-tasks"></span>系统日志
            </div>
        </div>
        <div class="panel-body pn">
            <table class="table table-striped table-hover" id="datatable" cellspacing="0" width="100%">
                <thead>
                <tr>
                    <th style="width: 50px;">序号</th>
                    <th style="width: 80px;">日志类型</th>
                    <th style="width: 120px;">客户端IP</th>
                    <th style="width: 150px;">服务端IP</th>
                    <th style="width: 80px;">开始内存</th>
                    <th style="width: 80px;">结束内存</th>
                    <th style="width: 80px;">开始总内存</th>
                    <th style="width: 80px;">结束总内存</th>
                    <th style="width: 70px;">操作状态</th>
                    <th style="width: 150px;">操作明细</th>
                    <th style="width: 60px;">执行时间</th>
                    <th style="width: 60px;">操作人</th>
                    <th style="width: 120px;">创建时间</th>
                </tr>
                </thead>
                <tbody>
                <tr th:each="sysOperalog : ${sysOperalogPage.list}" th:object="${sysOperalog}" th:attr="id=|tb_*{operaId}|">
                    <td th:text="${sysOperalogStat.index}+1 + ${(sysOperalogPage.pageNum-1)*sysOperalogPage.pageSize}"></td>
                    <td th:width="20px" th:text="*{logTypeName}"></td>
                    <td th:width="20px" th:text="*{clientIp}"></td>
                    <td th:width="20px" th:text="*{serverIp}"></td>
                    <td th:width="10px" th:text="*{startMem}"></td>
                    <td th:width="10px" th:text="*{endMem}"></td>
                    <td th:width="15px" th:text="*{startTotal}"></td>
                    <td th:width="15px" th:text="*{endTotal}"></td>
                    <td>
                        <span class="label label-success" th:if="*{operaStatus == '操作成功'}">操作成功</span>
                        <span class="label label-danger" th:if="*{operaStatus == '操作失败'}">操作失败</span>
                    </td>
                    <td th:width="20px">
                        <input th:value="*{operaDetail}" />
                    </td>
                    <td th:width="15px" th:text="*{invokeTime}"></td>
                    <td th:width="20px" th:text="*{employeeName}"></td>
                    <td th:width="50px" th:text="*{createTime == null ? '' : #dates.format(createTime, 'yyyy-MM-dd HH:mm:ss')}"></td>
                </tr>
                </tbody>
            </table>
            <div th:replace="admin/fragments/page :: page(${sysOperalogPage})"></div>
        </div>
    </div>

    <aside id="sidebar_right" class="nano affix">
        <div class="sidebar-right-content nano-content">
            <form method="" id="admin-form" th:action="@{${sysOperalogPage.requestUrl}}" th:object="${sysOperalogQuery}">
                <input type="hidden" th:value="p_3" name="pclass"/>
                <input type="hidden" th:value="c_5" name="currentClass"/>
                <input type="hidden" th:field="*{pageSize}"/>
                <input type="hidden" th:field="*{pageNum}"/>
                <div class="tab-block sidebar-block br-n">
                    <div class="tab-content br-n">
                        <div id="sidebar-right-tab1" class="tab-pane active">
                            <div class="admin-form">
                                <h5 class="title-divider text-muted mb20"><span
                                        class="glyphicon glyphicon-filter">过滤条件</span></h5>

                                <div class="section mb15" style="text-align: center">
                                    <label class="field prepend-icon">
                                        <input type="text" class="gui-input" id="clientIp" th:field="*{clientIp}"
                                               placeholder="客户端IP"/>
                                        <label class="field-icon">
                                            <i class="fa fa-tag"></i>
                                        </label>
                                    </label>
                                </div>

                                <div class="section mb15" style="text-align: center">
                                    <label class="field prepend-icon">
                                        <input type="text" class="gui-input" id="serverIp" th:field="*{serverIp}"
                                               placeholder="服务端IP"/>
                                        <label class="field-icon">
                                            <i class="fa fa-tag"></i>
                                        </label>
                                    </label>
                                </div>

                                <div class="section mb15" style="text-align: center">
                                    <label class="field prepend-icon">
                                        <input type="text" class="gui-input" id="employeeName" th:field="*{employeeName}"
                                               placeholder="操作人"/>
                                        <label class="field-icon">
                                            <i class="fa fa-tag"></i>
                                        </label>
                                    </label>
                                </div>

                                <div class="section mb15" style="text-align: center">
                                    <label class="field prepend-icon">
                                        <select id="operaStatus" th:field="*{operaStatus}" class="form-control">
                                            <option value="" th:selected="selected">--请选择操作状态--</option>
                                            <option th:value="操作成功">操作成功</option>
                                            <option th:value="操作失败">操作失败</option>
                                        </select>
                                    </label>
                                </div>

                                <div class="section mb15" style="text-align: center">
                                    <label class="field prepend-icon">
                                        <select id="logType" th:field="*{logType}" class="form-control">
                                            <option value="" th:selected="selected">--请选择日志模块--</option>
                                            <option th:value="FILE">云盘模块</option>
                                            <option th:value="EMPLOYEE">人员模块</option>
                                            <option th:value="EMPLOYEE_ROLE">人员角色模块</option>
                                            <option th:value="ROLE">角色模块</option>
                                            <option th:value="ROLE_PERMISSION">角色权限模块</option>
                                            <option th:value="PERMISSION">权限模块</option>
                                            <option th:value="SYSTEM">系统模块</option>
                                        </select>
                                    </label>
                                </div>

                                <div class="section" style="text-align: center">
                                    <button class="btn btn-default btn-sm" type="submit">查询</button>
                                    <button class="btn btn-default btn-sm" type="button" onclick="resetInput()">清空
                                    </button>
                                </div>

                            </div>
                        </div>
                    </div>
                </div>
            </form>
        </div>
    </aside>
</div>
<script type="text/javascript" th:inline="javascript" layout:fragment="javascript">
</script>
</body>
</html>